﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:eim="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" x:Name="userControl"
	mc:Ignorable="d"
	x:Class="RubricaSentimentale.Infos"
	d:DesignWidth="480" d:DesignHeight="800" Height="{Binding Height, ElementName=LayoutRoot}" MinHeight="400">
	<UserControl.Resources>
		<Storyboard x:Name="btnStoryboard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="stackPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-480"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="stackPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-1.5"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="tbxDetails">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-481.5"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="tbxDetails">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.5"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="reverse">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="stackPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="-481.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="stackPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="tbxDetails">
				<EasingDoubleKeyFrame KeyTime="0" Value="-481.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="tbxDetails">
				<EasingDoubleKeyFrame KeyTime="0" Value="3"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.5"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Background="Transparent" Height="{Binding Height, ElementName=stackPanel}" MinHeight="{Binding MinHeight, ElementName=userControl}">
		<StackPanel x:Name="stackPanel" RenderTransformOrigin="0.5,0.5" MinHeight="{Binding MinHeight, ElementName=LayoutRoot}" Height="{Binding ActualHeight, ElementName=tbxDetails, Mode=OneWay}" HorizontalAlignment="Stretch" VerticalAlignment="Center">
			<StackPanel.RenderTransform>
				<CompositeTransform/>
			</StackPanel.RenderTransform>
			<i:Interaction.Triggers>
				<i:EventTrigger SourceName="btnFilms" EventName="Tap">
					<eim:ControlStoryboardAction x:Name="filmstart" Storyboard="{StaticResource btnStoryboard}"/>
				</i:EventTrigger>
				<i:EventTrigger SourceName="btnText" EventName="Tap">
					<eim:ControlStoryboardAction x:Name="filmstart2" Storyboard="{StaticResource btnStoryboard}"/>
				</i:EventTrigger>
				<i:EventTrigger SourceName="btnDate" EventName="Tap">
					<eim:ControlStoryboardAction x:Name="filmstart3" Storyboard="{StaticResource btnStoryboard}"/>
				</i:EventTrigger>
				<i:EventTrigger SourceName="btnFood" EventName="Tap">
					<eim:ControlStoryboardAction x:Name="filmstart1" Storyboard="{StaticResource btnStoryboard}"/>
				</i:EventTrigger>
				<ec:PropertyChangedTrigger Binding="{Binding Reverse, ElementName=userControl}">
					<i:Interaction.Behaviors>
						<ec:ConditionBehavior>
							<ec:ConditionalExpression>
								<ec:ComparisonCondition LeftOperand="{Binding DetailView, ElementName=userControl}" RightOperand="true"/>
							</ec:ConditionalExpression>
						</ec:ConditionBehavior>
					</i:Interaction.Behaviors>
					<eim:ControlStoryboardAction Storyboard="{StaticResource reverse}"/>
				</ec:PropertyChangedTrigger>
			</i:Interaction.Triggers>
			<Button x:Name="btnFilms" Content="Film" Margin="65,0,73,0" Tap="btnFilms_Tap"/>
			<Button x:Name="btnFood" Content="Cibi" Margin="65,0,73,0" Tap="btnFood_Tap" />
			<Button x:Name="btnDate" Content="Date" Margin="65,0,73,0" Tap="btnDate_Tap" />
			<Button x:Name="btnText" Content="Note" Margin="65,0,73,0" Tap="btnText_Tap" />
		</StackPanel>
		<TextBlock x:Name="tbxDetails" TextWrapping="Wrap" MinHeight="{Binding MinHeight, ElementName=stackPanel}" HorizontalAlignment="Right" Margin="0,-1,-483,1" Width="480" RenderTransformOrigin="0.5,0.5">
			<TextBlock.RenderTransform>
				<CompositeTransform/>
			</TextBlock.RenderTransform>
		</TextBlock>
	</Grid>
</UserControl>